Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modus dropdown : Updated the Modus dropdown list UI #2749

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hsoni177
Copy link
Contributor

@hsoni177 hsoni177 commented Aug 2, 2024

Description

I updated the dropdown UI to match our requirements. I also tried to update the dropdown list to match the Modus Figma design, but this change affects the existing modus-list component.

Expected
image

Modus Has

image

Updated
image

References #2611

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@hsoni177 hsoni177 requested a review from coliff as a code owner August 2, 2024 14:47
Copy link

netlify bot commented Aug 2, 2024

Deploy Preview for moduswebcomponents ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e6d12e5
🔍 Latest deploy log https://app.netlify.com/sites/moduswebcomponents/deploys/66acf16f5d589f00085dd08d
😎 Deploy Preview https://deploy-preview-2749--moduswebcomponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 26 (🟢 up 1 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -123,7 +123,7 @@ export class ModusDropdown {
this.showDropdownListBorder ? 'list-border' : ''
} ${this.animateList ? 'animate-list' : ''} ${this.classByPlacement.get(this.placement)}`;
const left = this.placement === 'right' ? `${this.toggleElement?.offsetWidth}px` : 'unset';
const width = `${this.toggleElement?.offsetWidth ? this.toggleElement?.offsetWidth : 0}px`;
const width = `${(this.toggleElement?.offsetWidth || 0) < 240 ? 240 : this.toggleElement?.offsetWidth ? this.toggleElement?.offsetWidth : 0}px`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per modus UI, Apply the minimum width 240px.

@@ -58,7 +61,7 @@ export class ModusListItem {
render(): unknown {
const containerClass = `${this.classBySize.get(this.size)} ${this.disabled ? 'disabled' : ''} ${
this.selected ? 'selected' : ''
} ${this.borderless ? 'borderless' : ''}`;
} ${this.borderless ? 'borderless' : ''} ${this.radiusless ? 'radiusless' : ''}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a new prop to make list border less.

@cjwinsor
Copy link
Contributor

cjwinsor commented Aug 5, 2024

@hsoni177 Unfortunately, since we only have the existing guideline that the border is that gray color, we cannot immediately approve this PR. It will need to be discussed if the drop down menu should offer a borderless option. @enowak1031 @prashanth-offcl may need to chime in. Perhaps even @egunther39

@hsoni177
Copy link
Contributor Author

hsoni177 commented Aug 6, 2024

@hsoni177 Unfortunately, since we only have the existing guideline that the border is that gray color, we cannot immediately approve this PR. It will need to be discussed if the drop down menu should offer a borderless option. @enowak1031 @prashanth-offcl may need to chime in. Perhaps even @egunther39

@cjwinsor Sorry for the misunderstanding here.

  1. There is a typo error. I added a new prop in the list component to make the list radius-less: Modus dropdown : Updated the Modus dropdown list UI #2749 (comment).
  2. To achieve the UI as per our requirement in GIS, I added a box shadow to the dropdown UI, used a list component configurable prop like borderless, and added a new prop radius-less.

So everything is configurable. It does not affect the current behavior and UI except for the box-shadow.

@jcabrera87
Copy link
Contributor

@hsoni177 Unfortunately, since we only have the existing guideline that the border is that gray color, we cannot immediately approve this PR. It will need to be discussed if the drop down menu should offer a borderless option. @enowak1031 @prashanth-offcl may need to chime in. Perhaps even @egunther39

As per Dafnee: thats ok. Modus Figma file actually displays a dropdown without a border for the autocomplete component (see link below), so I was trying to follow their guidelines. They need to update the Figma and have a consistent look for the dropdown container. The border is fine if that's what Modus wants 👍 https://www.figma.com/design/wyfVJUHWRMkeCfdB38HFEE/Modus---Web?m=auto&node-id=10423-28210&t=JKbWRPUjc6I4ytxe-1

Copy link
Collaborator

@prashanth-offcl prashanth-offcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hsoni177 Looks like we are trying to solve three issues

  • Borderless option for list item component is already implemented so we can skip this.
  • The border radius of the list items looks different from Figma. The current implementation is different that what we have in Figma and the style guide. Instead of the proposed property in the PR, may I suggest we apply the border to the modus-list component instead of the list-item component?
  • Dropdown menu min width - I'll check with UX and get back on this

@prashanth-offcl
Copy link
Collaborator

@hsoni177 Created this issue #2820 to get the UX recommendation for dropdowns.

@prashanth-offcl prashanth-offcl marked this pull request as draft August 30, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants